Optimal. Leaf size=113 \[ \frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \tanh ^{-1}\left (\frac {\sqrt {d e-c f} x}{\sqrt {e} \sqrt {c+d x^2}}\right )}{2 e^{3/2} (d e-c f)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {541, 12, 385,
214} \begin {gather*} \frac {x \sqrt {c+d x^2} (b e-a f)}{2 e \left (e+f x^2\right ) (d e-c f)}-\frac {(a c f-2 a d e+b c e) \tanh ^{-1}\left (\frac {x \sqrt {d e-c f}}{\sqrt {e} \sqrt {c+d x^2}}\right )}{2 e^{3/2} (d e-c f)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 214
Rule 385
Rule 541
Rubi steps
\begin {align*} \int \frac {a+b x^2}{\sqrt {c+d x^2} \left (e+f x^2\right )^2} \, dx &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}+\frac {\int \frac {-b c e+2 a d e-a c f}{\sqrt {c+d x^2} \left (e+f x^2\right )} \, dx}{2 e (d e-c f)}\\ &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \int \frac {1}{\sqrt {c+d x^2} \left (e+f x^2\right )} \, dx}{2 e (d e-c f)}\\ &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \text {Subst}\left (\int \frac {1}{e-(d e-c f) x^2} \, dx,x,\frac {x}{\sqrt {c+d x^2}}\right )}{2 e (d e-c f)}\\ &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \tanh ^{-1}\left (\frac {\sqrt {d e-c f} x}{\sqrt {e} \sqrt {c+d x^2}}\right )}{2 e^{3/2} (d e-c f)^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.55, size = 131, normalized size = 1.16 \begin {gather*} \frac {\frac {\sqrt {e} (b e-a f) x \sqrt {c+d x^2}}{(d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \tan ^{-1}\left (\frac {-f x \sqrt {c+d x^2}+\sqrt {d} \left (e+f x^2\right )}{\sqrt {e} \sqrt {-d e+c f}}\right )}{(-d e+c f)^{3/2}}}{2 e^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(847\) vs.
\(2(97)=194\).
time = 0.12, size = 848, normalized size = 7.50
method | result | size |
default | \(\frac {\left (-a f +b e \right ) \left (-\frac {f \sqrt {\left (x -\frac {\sqrt {-f e}}{f}\right )^{2} d +\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{\left (c f -d e \right ) \left (x -\frac {\sqrt {-f e}}{f}\right )}+\frac {d \sqrt {-f e}\, \ln \left (\frac {\frac {2 c f -2 d e}{f}+\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x -\frac {\sqrt {-f e}}{f}\right )^{2} d +\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x -\frac {\sqrt {-f e}}{f}}\right )}{\left (c f -d e \right ) \sqrt {\frac {c f -d e}{f}}}\right )}{4 e \,f^{2}}-\frac {\left (a f +b e \right ) \ln \left (\frac {\frac {2 c f -2 d e}{f}+\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x -\frac {\sqrt {-f e}}{f}\right )^{2} d +\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x -\frac {\sqrt {-f e}}{f}}\right )}{4 e \sqrt {-f e}\, f \sqrt {\frac {c f -d e}{f}}}-\frac {\left (-a f -b e \right ) \ln \left (\frac {\frac {2 c f -2 d e}{f}-\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x +\frac {\sqrt {-f e}}{f}\right )^{2} d -\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x +\frac {\sqrt {-f e}}{f}}\right )}{4 e \sqrt {-f e}\, f \sqrt {\frac {c f -d e}{f}}}+\frac {\left (-a f +b e \right ) \left (-\frac {f \sqrt {\left (x +\frac {\sqrt {-f e}}{f}\right )^{2} d -\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{\left (c f -d e \right ) \left (x +\frac {\sqrt {-f e}}{f}\right )}-\frac {d \sqrt {-f e}\, \ln \left (\frac {\frac {2 c f -2 d e}{f}-\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x +\frac {\sqrt {-f e}}{f}\right )^{2} d -\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x +\frac {\sqrt {-f e}}{f}}\right )}{\left (c f -d e \right ) \sqrt {\frac {c f -d e}{f}}}\right )}{4 e \,f^{2}}\) | \(848\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 240 vs.
\(2 (101) = 202\).
time = 3.92, size = 523, normalized size = 4.63 \begin {gather*} \left [-\frac {{\left (a c f^{2} x^{2} + {\left (b c - 2 \, a d\right )} e^{2} + {\left ({\left (b c - 2 \, a d\right )} f x^{2} + a c f\right )} e\right )} \sqrt {-c f e + d e^{2}} \log \left (\frac {c^{2} f^{2} x^{4} - 4 \, {\left (c f x^{3} - {\left (2 \, d x^{3} + c x\right )} e\right )} \sqrt {d x^{2} + c} \sqrt {-c f e + d e^{2}} + {\left (8 \, d^{2} x^{4} + 8 \, c d x^{2} + c^{2}\right )} e^{2} - 2 \, {\left (4 \, c d f x^{4} + 3 \, c^{2} f x^{2}\right )} e}{f^{2} x^{4} + 2 \, f x^{2} e + e^{2}}\right ) - 4 \, {\left (a c f^{2} x e + b d x e^{3} - {\left (b c + a d\right )} f x e^{2}\right )} \sqrt {d x^{2} + c}}{8 \, {\left (c^{2} f^{3} x^{2} e^{2} + d^{2} e^{5} + {\left (d^{2} f x^{2} - 2 \, c d f\right )} e^{4} - {\left (2 \, c d f^{2} x^{2} - c^{2} f^{2}\right )} e^{3}\right )}}, \frac {{\left (a c f^{2} x^{2} + {\left (b c - 2 \, a d\right )} e^{2} + {\left ({\left (b c - 2 \, a d\right )} f x^{2} + a c f\right )} e\right )} \sqrt {c f e - d e^{2}} \arctan \left (-\frac {{\left (c f x^{2} - {\left (2 \, d x^{2} + c\right )} e\right )} \sqrt {d x^{2} + c} \sqrt {c f e - d e^{2}}}{2 \, {\left ({\left (d^{2} x^{3} + c d x\right )} e^{2} - {\left (c d f x^{3} + c^{2} f x\right )} e\right )}}\right ) + 2 \, {\left (a c f^{2} x e + b d x e^{3} - {\left (b c + a d\right )} f x e^{2}\right )} \sqrt {d x^{2} + c}}{4 \, {\left (c^{2} f^{3} x^{2} e^{2} + d^{2} e^{5} + {\left (d^{2} f x^{2} - 2 \, c d f\right )} e^{4} - {\left (2 \, c d f^{2} x^{2} - c^{2} f^{2}\right )} e^{3}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b x^{2}}{\sqrt {c + d x^{2}} \left (e + f x^{2}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 336 vs.
\(2 (101) = 202\).
time = 2.32, size = 336, normalized size = 2.97 \begin {gather*} -\frac {{\left (a c \sqrt {d} f + b c \sqrt {d} e - 2 \, a d^{\frac {3}{2}} e\right )} \arctan \left (\frac {{\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} f - c f + 2 \, d e}{2 \, \sqrt {c d f e - d^{2} e^{2}}}\right )}{2 \, \sqrt {c d f e - d^{2} e^{2}} {\left (c f e - d e^{2}\right )}} - \frac {{\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} a c \sqrt {d} f^{2} - {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} b c \sqrt {d} f e - 2 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} a d^{\frac {3}{2}} f e - a c^{2} \sqrt {d} f^{2} + 2 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} b d^{\frac {3}{2}} e^{2} + b c^{2} \sqrt {d} f e}{{\left ({\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{4} f - 2 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} c f + 4 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} d e + c^{2} f\right )} {\left (c f^{2} e - d f e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {b\,x^2+a}{\sqrt {d\,x^2+c}\,{\left (f\,x^2+e\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________